
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href="/static/admin/css/pintuer.css">
<link rel="stylesheet" href="/static/admin/css/admin.css">
<script src="/static/admin/js/jquery.js"></script>
<script src="/static/js/pintuer.js"></script>
<link rel="stylesheet" href="/static/admin/kindeditor/examples/index.css" />
<script charset="utf-8" src="/static/adminkindeditor/kindeditor.js"></script>
 <script src="https://code.jquery.com/jquery-3.3.1.js"></script>
 <script>
	KE.show({
		id : 'content',
	});
</script>
</head>
<body>
<div class="panel admin-panel">
  <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>增加内容</strong></div>
  <div class="body-content">
    <form method="post" class="form-x" action="{:url('index/update')}"  enctype="multipart/form-data">  <!-- 规定编码传输格式 -->
      <input type="hidden" name="id" value="{$data.id}" />
      <div class="form-group">
        <div class="label">
          <label>楼栋编号：</label>
        </div>
        <div class="field">
         <select id="n_id" name="n_id" class="input w50"  data-validate="required:请选择产品分类" >
                            <option>请选择楼栋</option>
                            {foreach $list as $val}
			                <option value="{$val.n_id}">{$val.n_name}</option>
			               {/foreach}
			             
            </select>
          <div class="tips"></div>
        </div>
      </div>
      
      
      
      
      
     <div class="form-group">
        <div class="label">
          <label>房间编号：</label>
        </div>
        <div class="field">
         <select name="r_id" id="r_id" class="input w50"  data-validate="required:请选择产品分类" >
                            <option>请选择房间</option>
                            
			             
            </select>
          <div class="tips"></div>
        </div>
      </div> 
      
       <div class="form-group">
        <div class="label">
          <label>户型：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="{$data.t_id}" name="t_id" data-validate="required:请输入学生性别" />
          <div class="tips"></div>
        </div>  
      </div>
         
      
        
   
      
     
      
      <div class="form-group">
        <div class="label">
          <label>面积：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" name="area" value="{$data.area}"  data-validate="number:身份证号必须为数字" />
          <div class="tips"></div>
        </div>
      </div>
    <div class="form-group">
        <div class="label">
          <label>联系方式：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" name="tel" value="{$data.tel}"  data-validate="number:身份证号必须为数字" />
          <div class="tips"></div>
        </div>
      </div>
       <div class="form-group">
        <div class="label">
          <label>押金：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" name="yajin" value="{$data.yajin}"  data-validate="number:身份证号必须为数字" />
          <div class="tips"></div>
        </div>
      </div> 
    <div class="form-group">
        <div class="label">
          <label>付款方式</label>
        </div>
        <div class="field">
         <select id="n_id" name="p_id" class="input w50"  data-validate="required:请选择产品分类" >
                            <option>请选择付款方式</option>
                            {foreach $list1 as $val}
			                <option value="{$val.p_id}">{$val.p_pay}</option>
			               {/foreach}
			             
            </select>
          <div class="tips"></div>
        </div>
      </div>
      
      
      
      
      <div class="form-group">
        <div class="label">
          <label>租金：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" name="zujin" value="{$data.zujin}"  data-validate="number:身份证号必须为数字" />
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label>管理员：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" name="guanliyuan" value="{$data.guanliyuan}"  data-validate="number:身份证号必须为数字" />
          <div class="tips"></div>
        </div>
      </div>
      
      <div class="form-group">
        <div class="label">
          <label></label>
        </div>
        <div class="field">
          <button class="button bg-main icon-check-square-o" type="submit" name="sub" value='1'> 提交</button>
        </div>
      </div>
    </form>
  </div>
</div>
<script>
	$("#n_id").change(function(){
		//alert($(this).val());
       $.post("{:url('index/list1')}",{ r_id:$(this).val()},function(data){
		
            var str="<option value=''>--请选择--</option>";
            
            $.each(data,function(k,value){
            	//alert(value);
                str+="<option value='"+value['r_id']+"'>"+value['r_name']+"</option>";
                

            });
            $('#r_id').html(str);
        });
    });
</script>
</body></html>

